package com.osgc.rf.np.util;

import java.util.List;

import com.inca.np.gui.control.DBTableModel;

/**
 * 2011.08.09
 * 
 * @author duanzj
 */
public class ObjectHelper {
	public static boolean isNULL(Object targetObject) {
		if (null == targetObject)
			return true;
		if (targetObject instanceof String) {
			if ("".equals((String) targetObject))
				return true;
		} else if (targetObject instanceof DBTableModel) {
			DBTableModel dbTableModel = (DBTableModel) targetObject;
			if (dbTableModel.getRowCount() <= 0) {
				return true;
			}
		} else if (targetObject instanceof List) {
			List list = (List) targetObject;
			if (list.size() <= 0) {
				return true;
			}
		}
		return false;
	}
}
